package com.hz.airline.entity;

import com.alibaba.fastjson.annotation.JSONField;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by kevin on 2020/2/1 20:35
 */
@Entity
@Table(name = "t_user")
public class User {

    @Id
    @Column(name = "user_id")
    private String userid;

    @Column(name = "username")
    private String username;

    @Column(name = "password")
    private String password;

    @Column(name = "email")
    private String email;

    @Column(name = "gender")
    private String gender;

    @Column(name = "mobile")
    private String mobile;

    @Column(name = "idnumber")
    private String idnumber;

    @Column(name = "permission_id")
    private int permissionid;

    @Column(name = "openmoney")
    private String openmoney;

    @JSONField(format = "yyyy-MM-dd")
    @Column(name = "expiredate", columnDefinition = "DATE")
    private Date expiredate;

    @JSONField(format = "yyyy-MM-dd")
    @Transient
    private Date serveredate;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "createtime", columnDefinition = "DATE")
    private Date createtime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @Column(name = "updatetime", columnDefinition = "DATE")
    private Date updatetime;

    public String getUserid() {
        return userid;
    }

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getIdnumber() {
        return idnumber;
    }

    public void setIdnumber(String idnumber) {
        this.idnumber = idnumber;
    }

    public int getPermissionid() {
        return permissionid;
    }

    public void setPermissionid(int permissionid) {
        this.permissionid = permissionid;
    }

    public String getOpenmoney() {
        return openmoney;
    }

    public void setOpenmoney(String openmoney) {
        this.openmoney = openmoney;
    }

    public Date getExpiredate() {
        return expiredate;
    }

    public void setExpiredate(Date expiredate) {
        this.expiredate = expiredate;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public Date getServeredate() {
        return serveredate;
    }

    public void setServeredate(Date serveredate) {
        this.serveredate = serveredate;
    }

    @Override
    public String toString() {
        return "User{" +
                "userid='" + userid + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", gender='" + gender + '\'' +
                ", mobile='" + mobile + '\'' +
                ", idnumber='" + idnumber + '\'' +
                ", permissionid=" + permissionid +
                ", openmoney='" + openmoney + '\'' +
                ", expiredate=" + expiredate +
                ", serveredate=" + serveredate +
                ", createtime=" + createtime +
                ", updatetime=" + updatetime +
                '}';
    }
}
